home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / minix / up1510b.tgz / up1510b / src / fs / mount.c.D < prev    next >
Text File  |  1990-07-25  |  4KB  |  143 lines

  1. *** /tmp/,RCSt1022235    Wed Jul 25 13:48:53 1990
  2. --- mount.c    Mon Jul 23 10:36:29 1990
  3. ***************
  4. *** 6,18 ****
  5.    */
  6.   
  7. ! #include "../h/const.h"
  8. ! #include "../h/type.h"
  9. ! #include "../h/error.h"
  10. ! #include "const.h"
  11. ! #include "type.h"
  12.   #include "buf.h"
  13.   #include "file.h"
  14.   #include "fproc.h"
  15. - #include "glo.h"
  16.   #include "inode.h"
  17.   #include "param.h"
  18. --- 6,14 ----
  19.    */
  20.   
  21. ! #include "fs.h"
  22. ! #include <sys/stat.h>
  23.   #include "buf.h"
  24.   #include "file.h"
  25.   #include "fproc.h"
  26.   #include "inode.h"
  27.   #include "param.h"
  28. ***************
  29. *** 19,22 ****
  30. --- 15,20 ----
  31.   #include "super.h"
  32.   
  33. + FORWARD dev_t name_to_dev();
  34.   /*===========================================================================*
  35.    *                do_mount                     *
  36. ***************
  37. *** 28,36 ****
  38.     register struct inode *rip, *root_ip;
  39.     struct super_block *xp, *sp;
  40. !   dev_nr dev;
  41. !   mask_bits bits;
  42.     int r, found, loaded;
  43. -   extern struct inode *get_inode(), *eat_path();
  44. -   dev_nr name_to_dev();
  45.   
  46.     /* Only the super-user may do MOUNT. */
  47. --- 26,32 ----
  48.     register struct inode *rip, *root_ip;
  49.     struct super_block *xp, *sp;
  50. !   dev_t dev;
  51. !   mode_t bits;
  52.     int r, found, loaded;
  53.   
  54.     /* Only the super-user may do MOUNT. */
  55. ***************
  56. *** 103,108 ****
  57.       put_inode(rip);
  58.       put_inode(root_ip);
  59. !     if (loaded) unload_bit_maps(dev);
  60. !     do_sync();
  61.       invalidate(dev);
  62.       sp->s_dev = NO_DEV;
  63. --- 99,104 ----
  64.       put_inode(rip);
  65.       put_inode(root_ip);
  66. !     if (loaded) (void) unload_bit_maps(dev);
  67. !     (void) do_sync();
  68.       invalidate(dev);
  69.       sp->s_dev = NO_DEV;
  70. ***************
  71. *** 128,136 ****
  72.     register struct inode *rip;
  73.     struct super_block *sp, *sp1;
  74. !   dev_nr dev;
  75.     int count;
  76. -   dev_nr name_to_dev();
  77.   
  78.     /* Only the super-user may do UMOUNT. */
  79.     if (!super_user) return(EPERM);
  80. --- 124,130 ----
  81.     register struct inode *rip;
  82.     struct super_block *sp, *sp1;
  83. !   dev_t dev;
  84.     int count;
  85.   
  86.     /* Only the super-user may do UMOUNT. */
  87.     if (!super_user) return(EPERM);
  88. ***************
  89. *** 160,164 ****
  90.     if (sp != NIL_SUPER)
  91.       if (unload_bit_maps(dev) != OK) panic("do_umount", NO_NUM);
  92. !   do_sync();            /* force any cached blocks out of memory */
  93.     invalidate(dev);        /* invalidate cache entries for this dev */
  94.     if (sp == NIL_SUPER) return(EINVAL);
  95. --- 154,158 ----
  96.     if (sp != NIL_SUPER)
  97.       if (unload_bit_maps(dev) != OK) panic("do_umount", NO_NUM);
  98. !   (void) do_sync();        /* force any cached blocks out of memory */
  99.     invalidate(dev);        /* invalidate cache entries for this dev */
  100.     if (sp == NIL_SUPER) return(EINVAL);
  101. ***************
  102. *** 177,181 ****
  103.    *                name_to_dev                     *
  104.    *===========================================================================*/
  105. ! PRIVATE dev_nr name_to_dev(path)
  106.   char *path;            /* pointer to path name */
  107.   {
  108. --- 171,175 ----
  109.    *                name_to_dev                     *
  110.    *===========================================================================*/
  111. ! PRIVATE dev_t name_to_dev(path)
  112.   char *path;            /* pointer to path name */
  113.   {
  114. ***************
  115. *** 185,190 ****
  116.   
  117.     register struct inode *rip;
  118. !   register dev_nr dev;
  119. !   extern struct inode *eat_path();
  120.   
  121.     /* If 'path' can't be opened, give up immediately. */
  122. --- 179,183 ----
  123.   
  124.     register struct inode *rip;
  125. !   register dev_t dev;
  126.   
  127.     /* If 'path' can't be opened, give up immediately. */
  128. ***************
  129. *** 199,203 ****
  130.   
  131.     /* Extract the device number. */
  132. !   dev = (dev_nr) rip->i_zone[0];
  133.     put_inode(rip);
  134.     return(dev);
  135. --- 192,196 ----
  136.   
  137.     /* Extract the device number. */
  138. !   dev = (dev_t) rip->i_zone[0];
  139.     put_inode(rip);
  140.     return(dev);
  141.